package com.wowudi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wowudi.entity.Equipment;
import com.wowudi.mapper.BedMapper;
import com.wowudi.mapper.EquipmentMapper;
import com.wowudi.service.BedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wowudi.mapper.HouseMapper;
import com.wowudi.entity.House;
import com.wowudi.service.HouseService;
@Service
public class HouseServiceImpl extends ServiceImpl<HouseMapper, House> implements HouseService{

    @Autowired
    private HouseMapper houseMapper;

    @Autowired
    private EquipmentMapper equipmentMapper;

    /**
    * Description: 查询所有病房<br/>
    * date: 2022-3-29<br/>
    * @author 贺同志<br/>
    */
    @Override
    public List<House> findHouseAll() {
        List<House> houseList = houseMapper.selectHouseAll();
        return houseList;
    }


    /**
    * Description: 添加病房<br/>
    * date: 2022-3-31<br/>
    * @author 贺同志<br/>
    */
    @Override
    public int addHouse(House house) {
        return houseMapper.insert(house);
    }


    /**
    * Description: 修改病房<br/>
    * date: 2022-3-31<br/>
    * @author 贺同志<br/>
    */
    @Override
    public int updateHouse(House house) {
        return houseMapper.updateById(house);
    }
}
